<!doctype html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="res/layui/css/layui.css" />
    <link rel="stylesheet" href="res/css/global.css" />
    <title>Category</title>
</head>
<body>
<div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-1" >
    <div class="layui-table-box">
        <div class="layui-table-header">
            <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                <thead>
                <tr>
                    <th data-field="id">
                        <div class="layui-table-cell laytable-cell-1-id"><span>ID</span><span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc"></i><i class="layui-edge layui-table-sort-desc"></i></span></div>
                    </th>
                    <th data-field="username">
                        <div class="layui-table-cell laytable-cell-1-9"><span>分类名</span></div>
                    </th>
                    <th data-field="sex">
                        <div class="layui-table-cell laytable-cell-1-sex"><span>状态</span><span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc"></i><i class="layui-edge layui-table-sort-desc"></i></span></div>
                    </th>

                    <th data-field="9">
                        <div class="layui-table-cell laytable-cell-1-9" align="center"><span></span></div>
                    </th>
                    <th class="layui-table-patch">
                        <div class="layui-table-cell" style="width: 16px;"></div>
                    </th>
                </tr>
                </thead>
            </table>
        </div>
        <div class="layui-table-body layui-table-main" >
            <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                <tbody>
                <#list category as categorys>
                <tr data-index="0">
                    <td data-field="id">
                        <div class="layui-table-cell laytable-cell-1-id">${categorys.id}</div>
                    </td>
                    <td data-field="username">
                        <div class="layui-table-cell laytable-cell-1-9">${categorys.name}</div>
                    </td>
                    <td data-field="sex">
                    <#if categorys.deleted>
                        <div class="layui-table-cell laytable-cell-1-sex">不可用</div>
                        <#else >
                            <div class="layui-table-cell laytable-cell-1-sex">可用</div>
                    </#if>

                    </td>

                    <td data-field="9" align="center" data-off="true">
                        <div class="layui-table-cell laytable-cell-1-9">

                            <a href="/findCategory?c_id=${categorys.id}" class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                            <#if categorys.deleted>
                                <a href="/enableCategory?c_id=${categorys.id}" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" >可用</a>
                                <#else >
                                <a href="/delCategory?c_id=${categorys.id}" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" >不可用</a>
                            </#if>
                        </div>
                    </td>
                </tr>
                </#list>


                </tbody>
                </table>
            </div>
        </div>
    </div>
<div class="layui-form-item">
    <button class="layui-btn" href="/add" >ADDCategory</button>

</div>

    <style>
        .laytable-cell-1-id {
            width: 80px;
        }

        .laytable-cell-1-username {
            width: 80px;
        }

        .laytable-cell-1-sex {
            width: 80px;
        }

        .laytable-cell-1-city {
            width: 80px;
        }

        .laytable-cell-1-sign {
            width: 170px;
        }

        .laytable-cell-1-experience {
            width: 80px;
        }

        .laytable-cell-1-score {
            width: 80px;
        }

        .laytable-cell-1-classify {
            width: 80px;
        }

        .laytable-cell-1-wealth {
            width: 135px;
        }

        .laytable-cell-1-9 {
            width: 165px;
        }
    </style>
</div>

</body>
</html>